package com.yc.project2.myjunit;

import com.yc.project2.myjunit.annotions.*;
import com.yc.project2.testUnit4.Calculation;
import org.apache.log4j.Logger;

/**
 * @author zwei
 * @create 2024-07-26 17:27
 */
public class TestCalculator {
    private static Logger logger=    Logger.getLogger(TestCalculator.class);
    static Calculation js;//待测试的功能单元

    public TestCalculator() {
        logger.info("calculationTest的构造方法的生命周期");
    }

    @MyBeforeClass
    public static void beforeClass() {
        logger.info(" beforeClass()");
    }
    @MyBeforeClass
    public static void beforeClass2() {
        logger.info(" beforeClass2()");
    }
    @MyBefore
    public void before() {
        logger.info(" before()");
    }
    @MyBefore
    public void before2() {
        logger.info(" before2()");
    }
    @MyAfter
    public void after() {
        logger.info(" after()");
    }
    @MyAfter
    public void after2() {
        logger.info(" after2()");
    }
    @MyAfterClass
    public static void afterClass() {
        logger.info(" afterClass()");
    }
    @MyAfterClass
    public static void afterClass2() {
        logger.info(" afterClass2()");
    }

    @MyTest
    public void add() {
        logger.info(" add()");
    }
    @MyTest
    public void sub() {
        logger.info(" sub()");
    }
}
